package gridModel;

import java.awt.event.MouseEvent;

public enum PixStates {
	
	CROSSED {
		public PixStates getNext(int mouseButton) {
			switch (mouseButton) {
			case MouseEvent.BUTTON1:
			case MouseEvent.BUTTON3: return EMPTY;
			}
			return null;
		}

		public boolean hasPriority() {
			return false;
		}
	},
	EMPTY {
		public PixStates getNext(int mouseButton) {
			switch (mouseButton) {
			case MouseEvent.BUTTON1: return FULL;
			case MouseEvent.BUTTON3: return CROSSED;
			}
			return null;
		}

		public boolean hasPriority() {
			return false;
		}
	},
	FULL {
		public PixStates getNext(int mouseButton) {
			switch (mouseButton) {
			case MouseEvent.BUTTON1:
			case MouseEvent.BUTTON3: return EMPTY;
			}
			return null;
		}

		public boolean hasPriority() {
			return true;
		}
	};
	
	public abstract PixStates getNext(int mouseButton);
	
	public abstract boolean hasPriority();
	
}
